home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 1 / Eagles_Nest_Mac_Collection_Disc_1.TOAST / HyperCard & XCMD⁄XFCN / HCPlayer22 / Home / stack_-1.xml < prev    next >
Extensible Markup Language  |  1993-12-14  |  12KB  |  26 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>5</cardCount>
  7.     <cardID>4894</cardID>
  8.     <listID>2153</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àûHyperCard Lite Home StackVersion 2.2¬©Copyright 1987-1991,1993 by Apple Computer, Inc.All Rights Reserved.THE MESSAGE HANDLERS USED IN THIS SCRIPT:startUp,getHomeInfo,resume,help,hyperTalknav,c,b,s,mw,vw,se,ss,xy,disallowInterruption,allowInterruptionsetUserLevelFive,restoreUserLevel,searchScript,checkForMissingFontsTHE FUNCTION HANDLERS USED IN THIS SCRIPT:lastHCItem,checkHCFontXCMD'S USED BY THIS SCRIPT:FontExists XFCNForm: FontExists(<font name>,<point size>)It returns true if the font/point size is installed or false if not.‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû-----  Startup/Resume Scripts:  ---------------------------------------------on startUp-- Requires handler: getHomeInfo,checkForMissingFonts-- gets and sets the user's preferencescheckForMissingFontsgetHomeInfo-- audio Palette startupif there is a stack "Audio Help" then -- ‚àÜstart using stack "Audio Help" -- ‚àÜsend "startSound" to stack "Audio Help" -- ‚àÜend ifpass startUp -- so others can use itend startUpon getHomeInfo-- Needs: User preferences card of the home stack-- configures HyperCard to the user specified preferencesglobal Stacks,Applications,Documents,UserNameif short name of this stack is not "Home" then -- ‚àÜlock screenset lockRecent to trueset lockMessages to truepush this card -- remember where we arego home -- will take us to the home stack in case we're not thereput false into stackIsHomeelse put true into stackIsHomeput (cd fld "User Name" of cd "User Preferences") into UserNameset the userLevel to cd fld "User Level" of cd "User Preferences" -- hidden fieldset the powerKeys to hilite of cd btn id 3 of cd "User Preferences" -- Power Keysset the textArrows to hilite of cd btn id 2 of cd "User Preferences" -- Arrow keys in text-- load the search path globalsput bg fld "Paths" of cd "Stacks" of bg "Paths" into Stacksput bg fld "Paths" of cd "Applications" of bg "Paths" into Applicationsput bg fld "Paths" of cd "Documents" of bg "Paths" into Documentsif not stackIsHome thenpop card -- return to where we wereset lockRecent to false -- clean up for exitset lockMessages to falseunlock screenend ifend getHomeInfoon resume-- Requires handler: getHomeInfo-- gets and sets user preferences upon returninggetHomeInfopass resume -- so others can use itend resume-----  Help Scripts  --------------------------------------------on help theTopic-- ‚àÜ Note: typing "help <topic>" into msg box will locate-- the <topic> in "HyperCard Help"put "HyperCard Help" into theStack -- ‚àÜif ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ‚↠empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend helpon hyperTalk theTopic-- ‚àÜ Note: typing "hyperTalk <topic>" into msg box will locate-- the <topic> in "HyperTalk Reference"put "HyperTalk Reference" into theStack -- ‚àÜif ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ‚↠empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend hyperTalk-----  Utility Scripts  --------------------------------------------on nav  -- ‚àÜ type "nav" into message box-- Requires XCMD: palette "Navigator"palette "Navigator"end navon c  -- ‚àÜ type "c" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Card Info..."restoreUserLevelchoose saveToolend con b  -- ‚àÜ type "b" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Bkgnd Info..."restoreUserLevelchoose saveToolend bon s  -- ‚àÜ type "s" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Stack Info..."restoreUserLevelchoose saveToolend son mw  -- ‚àÜ type "mw" into message box-- Requires XWindow: Message Watchershow window "Message Watcher"end mwon vw  -- ‚àÜ type "vw" into message box-- Requires XWindow: Variable Watchershow window "Variable Watcher"end vwon se  -- ‚àÜ type "se" into message box-- Requires XWindow: Script Editorask "Set script editor font type to:" with "Monaco" -- ‚àÜ default valueif the result is "Cancel" or it is empty then exit seset scriptTextFont to itask "Set script editor font size to:" with "9" -- ‚àÜ default valueif the result is "Cancel" or it is empty then exit seset scriptTextSize to itend seon ss pattern,stackName  -- ‚àÜ type "ss" into message box-- Requires handler: searchScriptsearchScript pattern,stackNameend sson xy  -- ‚àÜ type "xy" into message box to obtain mouse coordinatesset cursor to crossrepeat until the mouseClickput the mouseLoc && "  horz:" & the mouseH && "  vert:" & the mouseVend repeatend xyon disallowInterruption -- so can't stop scripts while runningset cantAbort of this stack to trueend disallowInterruptionon allowInterruption -- so can stop scripts while runningset cantAbort of this stack to falseend allowInterruptionon setUserLevelFive -- some things need this userLevelglobal SvLvlput the userLevel into SvLvlset the userLevel to 5end setUserLevelFiveon restoreUserLevel -- use after setUserLevelFiveglobal SvLvlif SvLvl is a number then set the userLevel to SvLvlend restoreUserLevelon searchScript pattern,stackName-- Requires handlers: setUserLevelFive,restoreUserLevel-- search ALL scripts of a stack for a 'pattern' of charactersglobal ScriptFindString -- HyperTalk global variableset lockRecent to truesetUserLevelFive -- saves current level and sets level 5push card -- remember where we areif pattern is empty thenask "Search for what string?" with ScriptFindString -- ‚àÜif (it is empty) or (the result is "Cancel") then exit searchScriptput it into pattern -- otherwise use it as the search patternend if-- put in HyperTalk global so just CMD-F in editor for easy findput pattern into ScriptFindStringset lockMessages to true -- avoid open messagesif stackName is not empty then go to stack stackName-- Note: if stackName is empty then we search the current stackset cursor to busy-- search the stack script of the stackif the script of this stack contains patternthen edit script of this stack-- search the background scripts and objects of the stackrepeat with curBkgnd = 1 to the number of bkgndsset cursor to busygo to card 1 of bkgnd curBkgndif the script of this bkgnd contains patternthen edit script of bkgnd curBkgndrepeat with curBgBtn = 1 to the number of bkgnd buttonsset cursor to busyif the script of bkgnd button curBgBtn contains patternthen edit script of bkgnd button curBgBtnend repeatrepeat with curBgField = 1 to the number of bkgnd fieldsset cursor to busyif the script of bkgnd field curBgField contains patternthen edit script of bkgnd field curBgFieldend repeatend repeat-- search the card scripts and objects of the stackrepeat with curCard = 1 to the number of cardsset cursor to busygo card curCardif the script of this card contains patternthen edit script of this cardrepeat with curCdBtn = 1 to the number of card buttonsset cursor to busyif the script of card button curCdBtn contains patternthen edit script of card button curCdBtnend repeatrepeat with curCdFld = 1 to the number of card fieldsset cursor to busyif the script of card field curCdFld contains patternthen edit script of card field curCdFldend repeatend repeatset lockMessages to falseset lockRecent to falsepop card -- return to where we wererestoreUserLevel -- set userLevel back to whatever it wasanswer "Search script done!" -- ‚àÜend searchScriptfunction lastHCItem delim,theText-- returns the portion of <theText> that follows the last <delim>if delim is in theText thenput lastHCItem(delim,char offset(delim,theText) + 1 to ¬¨length(theText) of theText) into theTextend ifreturn theTextend lastHCItem-----  Font Adjustment Scripts:  ----------------------------------on checkForMissingFonts-- Requires handler: checkHCFont-- check to see if the fonts needed for the stacks are-- installed in the system. Inform the user if they're not.get checkHCFont("Courier","9,12") & checkHCFont("Geneva","10,14") & ¬¨checkHCFont("Palatino","10,12,14,18,24") & ¬¨checkHCFont("Helvetica","18,24") -- these are fonts needed by this stackif it is empty then exit checkForMissingFontselse put it into missingFontsbeep-- this dialog informs the user which fonts are missinganswer "These font(s) are missing from your system:" & ¬¨return & return & missingFonts & return & ¬¨"For text to display correctly in the stacks, make sure you have" ¬¨&& "installed the fonts included with HyperCard." -- ‚àÜend checkForMissingFontsfunction checkHCFont theFont,pointSizes-- Requires XFCN: FontExists-- returns a list of font sizes needed but not in the systemput empty into missing-- steps through each point size passed inrepeat with count = 1 to the number of items in pointSizesput item count of pointSizes into theCurrentPtSizeif not FontExists(theFont,theCurrentPtSize) -- if can't find itthen put theCurrentPtSize & "," after missingend repeatif missing is not empty thenput theFont & space before missingdelete last char of missingput return after missingend ifreturn missingend checkHCFont</script>
  17.     <background id="2717" file="background_2717.xml" name="Home Cards" />
  18.     <background id="5834" file="background_5834.xml" name="Preferences" />
  19.     <background id="16078" file="background_16078.xml" name="Paths" />
  20.     <card id="4894" file="card_4894.xml" marked="false" name="Welcome to..." owner="2717" />
  21.     <card id="2376" file="card_2376.xml" marked="false" name="Stacks" owner="16078" />
  22.     <card id="3517" file="card_3517.xml" marked="false" name="Applications" owner="16078" />
  23.     <card id="3090" file="card_3090.xml" marked="false" name="Documents" owner="16078" />
  24.     <card id="4594" file="card_4594.xml" marked="false" name="User Preferences" owner="5834" />
  25. </stack>
  26.